package unimelb.distSystems.project2;

import java.io.Serializable;

/*
 * Car class is an entity type for racing session 
 */
public class Car implements Serializable{
	private long car_id;
	private String filename;
	private long player_id;
	private float locationX;
	private float locationY;
	private float frontalDirection;
	
	/*
	 * Constructor
	 */
	public Car(long car_id,long player_id,String filename)
	{
		this.car_id=car_id;
		this.player_id=player_id;
		locationX=0.0f;
		locationY=0.0f;
		frontalDirection=0.0f;
		this.filename=filename;
	}
	
	/*
	 * Get unqiue ID of car
	 * Input: Nothing
	 * Output: long value of car ID
	 */
	public long getCarID()
	{
		return car_id;
	}
	
	/*
	 * Get unqiue ID of car driver
	 * Input: Nothing
	 * Output: long value of car driver ID
	 */
	public long getDriverPlayerID()
	{
		return player_id;
	}
	
	public float getLocationX()
	{
		return locationX;
	}
	
	public float getLocationY()
	{
		return locationY;
	}
	
	public float getFrontalDirection()
	{
		return frontalDirection;
	}
	
	public void setInfo(float locationX,float locationY,float frontalDirection)
	{
		this.locationX=locationX;
		this.locationY=locationY;
		this.frontalDirection=frontalDirection;
	}
	
	public String getFilename()
	{
		return filename;
	}
}
